<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="../editor.md-master/css/editormd.preview.min.css" />
		<link rel="stylesheet" href="../editor.md-master/css/editormd.css"/>
		
		<script type="text/javascript" src="../js/jquery-3.1.1.min.js" ></script>
		
		
		
	</head>
	<body>
		<div class="editormd" id="test-editormd">
			<textarea class="editormd-markdown-textarea" name="test-editormd-markdown-doc" id="editormd"></textarea>
			<textarea class="editormd-html-textarea" name="editorhtml" id="editorhtml"></textarea>
		</div>
		<button id="btn">生成md和html文本</button>
		<h1>md文本</h1>
		<p id="textarea_md"></p>
		<h1>html文本</h1>
		<p id="textarea_html"></p>
		
		<div id="content" class="content"></div>
	</body>
	<script src="../editor.md-master/lib/marked.min.js"></script>
    <script src="../editor.md-master/lib/prettify.min.js"></script>
	<script type="text/javascript" src="../editor.md-master/editormd.min.js" ></script>
	<script type="text/javascript" src="../js/editorconfigrue.js" ></script>
	<script type="text/javascript">
    		editormd.markdownToHTML("content");
  	</script>
    		
  	
	<script type="text/javascript">
			$("#btn").click(function(){
				$("#textarea_md").text($("#editormd").val());
				$("#textarea_html").text($("#editorhtml").val().toString());
				$("#content").append($("#editorhtml").val().toString());
//				location.href = $("#editorhtml").val();
				console.log($("#editorhtml").val());
			});
	</script>
	
</html>
